public class BitmapConvertUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static android.graphics.Bitmap |
bitmap2Gray(android.graphics.Bitmap bmSrc)
TSC 官方sdk 代码 start
|
static java.lang.String |
bytesToHexStr(byte[] bArray) |
static int |
calculateInsideInSampleSize(android.graphics.BitmapFactory.Options options,
int reqWidth,
int reqHeight) |
static byte[] |
convert(android.graphics.Bitmap bm) |
static byte[] |
convert2(android.graphics.Bitmap bm)
2017.08.24
朱哥
|
static byte[] |
cpcl_convert(android.graphics.Bitmap bm)
TSC 官方sdk 代码 end
|
static android.graphics.Bitmap |
decodeSampledBitmapFromBitmap(android.graphics.Bitmap bm,
int limitWidth,
int limitHeight) |
static android.graphics.Bitmap |
decodeSampledBitmapFromUri(android.content.Context context,
android.net.Uri uri,
int reqWidth,
int reqHeight) |
static byte[] |
getPinBmpPrintByte(android.graphics.Bitmap bm) |
static android.graphics.Bitmap |
getSingleColorBitmap(android.graphics.Bitmap bitmap,
int bgColor) |
static android.graphics.Bitmap |
gray2Binary(android.graphics.Bitmap graymap) |
static byte[] |
gray2bytes(android.graphics.Bitmap graymap) |
static java.lang.String |
hexStr2Str(java.lang.String hexStr) |
static byte[] |
hs_bmpToDatas(android.graphics.Bitmap original_bitmap) |
static android.graphics.Bitmap |
resizeBitmap(android.graphics.Bitmap bitmap,
int maxWidth)
保持长宽比缩小Bitmap
|
static android.graphics.Bitmap |
resizeBitmap(android.graphics.Bitmap bitmap,
int maxWidth,
int maxHeight)
保持长宽比缩小Bitmap
|
static android.graphics.Bitmap |
scale(android.graphics.Bitmap bitmap,
float sx,
float sy) |
static byte[] |
TSCSDK_bmpToDatas(android.graphics.Bitmap original_bitmap) |
static java.lang.String |
zlibCompress(byte[] data)
zlib压缩
|
public static android.graphics.Bitmap resizeBitmap(android.graphics.Bitmap bitmap, int maxWidth, int maxHeight)
bitmap
- maxWidth
- maxHeight
- public static android.graphics.Bitmap scale(android.graphics.Bitmap bitmap, float sx, float sy)
public static android.graphics.Bitmap resizeBitmap(android.graphics.Bitmap bitmap, int maxWidth)
bitmap
- maxWidth
- public static byte[] getPinBmpPrintByte(android.graphics.Bitmap bm)
public static java.lang.String bytesToHexStr(byte[] bArray)
public static java.lang.String hexStr2Str(java.lang.String hexStr)
public static android.graphics.Bitmap decodeSampledBitmapFromUri(android.content.Context context, android.net.Uri uri, int reqWidth, int reqHeight)
public static int calculateInsideInSampleSize(android.graphics.BitmapFactory.Options options, int reqWidth, int reqHeight)
public static byte[] hs_bmpToDatas(android.graphics.Bitmap original_bitmap)
public static android.graphics.Bitmap bitmap2Gray(android.graphics.Bitmap bmSrc)
public static byte[] TSCSDK_bmpToDatas(android.graphics.Bitmap original_bitmap)
public static android.graphics.Bitmap gray2Binary(android.graphics.Bitmap graymap)
public static byte[] gray2bytes(android.graphics.Bitmap graymap)
public static byte[] cpcl_convert(android.graphics.Bitmap bm)
public static android.graphics.Bitmap decodeSampledBitmapFromBitmap(android.graphics.Bitmap bm, int limitWidth, int limitHeight)
public static java.lang.String zlibCompress(byte[] data)
data
- 图片数据public static android.graphics.Bitmap getSingleColorBitmap(android.graphics.Bitmap bitmap, int bgColor)
public static byte[] convert2(android.graphics.Bitmap bm)
bm
- public static byte[] convert(android.graphics.Bitmap bm)